package com.kapcb.statemachine.builder;

import com.kapcb.statemachine.exception.TransitionFailException;

/**
 * <a>Title: AlertFailCallback </a>
 * <a>Author: Kapcb <a>
 * <a>Description: AlertFailCallback <a>
 *
 * @author Kapcb
 * @version 1.0
 * @date 2024/7/26 22:30
 * @since 1.0
 */
public class AlertFailCallback<S, E, C> implements FailCallback<S, E, C> {

    @Override
    public void onFail(S sourceState, E event, C context) {
        throw new TransitionFailException(
                "Cannot fire event [" + event + "] on current state [" + sourceState + "] with context [" + context + "]"
        );
    }

}
